package com.dameng.jianyouquan.interviewer.activity;

import android.content.Intent;
import android.os.Bundle;
import android.text.TextUtils;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;
import android.widget.Toast;

import androidx.appcompat.app.AppCompatActivity;

import com.dameng.jianyouquan.R;

import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.OnClick;

public class InterviewerPublish2Activity extends AppCompatActivity {

    @BindView(R.id.et_job_title)
    EditText etJobTitle;
    @BindView(R.id.et_content)
    EditText etContent;
    @BindView(R.id.et_persion_num)
    EditText etPersionNum;
    @BindView(R.id.btn_next)
    Button btnNext;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_interviewer_publish2);
        ButterKnife.bind(this);


    }

    @OnClick({ R.id.btn_next})
    public void onViewClicked(View view) {
        switch (view.getId()) {
            case R.id.btn_next:
                String jobtitle = etJobTitle.getText().toString().trim();
                String content = etContent.getText().toString().trim();
                String persion = etPersionNum.getText().toString().trim();
                if (TextUtils.isEmpty(jobtitle)||TextUtils.isEmpty(content)||TextUtils.isEmpty(persion)){
                    Toast.makeText(getApplicationContext(),"请填写完整信息再进行下一步",Toast.LENGTH_SHORT).show();
                    return;
                }
                Intent intent = getIntent();
                String postID = intent.getStringExtra("postID");
                String postName = intent.getStringExtra("postName");
                String industryID = intent.getStringExtra("industryID");
                String industryName = intent.getStringExtra("industryName");

                Intent intent2 = new Intent(InterviewerPublish2Activity.this, InterviewerPublish3Activity.class);
                intent2.putExtra("postID", postID);
                intent2.putExtra("postName", postName);
                intent2.putExtra("industryID", industryID);
                intent2.putExtra("industryName", industryName);
                intent2.putExtra("jobtitle",jobtitle);
                intent2.putExtra("content",content);
                intent2.putExtra("persion",persion);
                startActivity(intent2);

                break;
        }
    }
}
